<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>events</title>
  <script src="../vue.js"></script>
  <style>
    .content {
      width: 100px;
      height: 100px;
      background-color: bisque;
      color: snow;
    }
    .inner-content {
      width: 50px;
      height: 50px;
      background-color: blueviolet;
    }
  </style>
</head>
<body>
  <div id="root">
    <button @click.stop="handleClick(100, $event)">click</button>
    <a href="http://www.baidu.com" @click.stop.prevent="handleAnchorClick">baidu</a>
  
    <div class="content" @click.self="handleOuterClick">
      <div class="inner-content" @click.right="handleInnerClick">content</div>
    </div>

    <button v-on:click.meta.exact="handleClick">A</button>
  </div>
  <script>
    Vue.config.productionTip = false
    var vm = new Vue({
      el: '#root',
      methods: {
        handleClick(num, e) {
          console.log(0)
        },
        handleDivClick(e) {
          console.log(e)
        },
        handleAnchorClick(e) {
          // e.preventDefault();
          // e.stopPropagation();
          
        },
        handleOuterClick() {
          console.log('outer')
        },
        handleInnerClick() {
          console.log('inner')
        }
      },
    })

    // div.addEventListener('click', () => {
      
    // }, {
    //   capture: false,
    //   once: true,
    //   passive: true
    // })
  </script>
</body>
</html>